<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
</head>
<body>

<%
// 自增
	synchronized(application){
		int num = 0;
		if(application.getAttribute("number") == null){
			num = 1;
		}else{
			num = (int)(application.getAttribute("number"))+1;
		}
		out.print("你是第"+num+"个访问者");
		application.setAttribute("number",num);
	}
%>

<%
	Enumeration enumera = application.getInitParameterNames();
	while(enumera.hasMoreElements()){
		String name = (String)enumera.nextElement();
		String value = (String)application.getInitParameter(name);
		out.print(name+":"+value+"<br>");
	}
%>
</body>
</html>